#include<unordered_map>
#include<iostream>
using namespace std;
class Solution {
public:
    int findRepeatNumber(vector<int>& nums) {
        unordered_map<int,int>map;
        for(auto &c :nums)
        {
            if(map.count(c))
                return c;
            map[c]++;
        }
        return nums[1];
    }
};